package com.example.demo.service;

import com.example.demo.entity.Book;
import com.example.demo.entity.User;
import org.springframework.data.domain.Page;

import java.util.List;
import java.util.Optional;

public interface BookService {

    Optional<Book> add(Book req) throws Exception;

    Optional<Book> update(Book req) throws Exception;

    Optional<Boolean> deleteById(String optUserId, Long id) throws Exception;

    Optional<Book> queryById(Long id) throws Exception;

    Optional<List<Book>> list(Book req) throws Exception;

    Optional<Page<Book>> page(Book req) throws Exception;

    boolean isExist(Long orgCode, String barCode) throws Exception;
}
